package com.molichuxing.gateway.bff.permission.services;

import com.molichuxing.framework.dto.Paged;
import com.molichuxing.framework.result.ResponseResult;
import com.molichuxing.gateway.bff.permission.entity.response.*;
import com.molichuxing.services.infrastructure.dto.response.response.DesenseDto;

import java.util.List;
import java.util.Map;

public interface GroupBffService {

    ResponseResult<Paged<GroupVo>> getGroupList(Map<String, Object> param, int pageNum, int pageSize) throws Exception;

    ResponseResult<Boolean> createGroup(GroupCreateVo vo);

    ResponseResult<Boolean> modifyGroup(GroupModifyVo vo);

    /**
     * 进入修改账户页面时获取角色
     *
     * @return
     */
    OpGroupAndIovGroupVo getGroupListInModifyAccountPage(int systemType, int dealerId, String account) throws Exception;

    GroupBindResourceVo getPermissionTree(int groupId, int groupSystemType);

    /**
     * 通过id获取角色绑定的脱敏字段
     * @param groupId
     * @return
     */
    public List<DesenseVo> getDesenseByGroupId(int groupId);

    /**
     * \创建角色与脱敏字段的关联
     * @param groupId
     * @param desenseIds
     * @return
     */
    public boolean createBatchGroupDesense(int groupId, List<Integer> desenseIds);

    /**
     * 创建角色与权限的关联（先删除后添加，如果resourceIds为null则只删除不添加）
     * @return
     */
    public ResponseResult<Boolean> createBatchGroupResource(GroupBindVo vo);
}
